<?php
/**
 * Created by PhpStorm.
 * User: 670
 * Date: 2021/12/5
 * Time: 23:51
 */
$old_file_name =  $_FILES['file']['name'];
////echo '<br />';
$tempPath =  $_FILES['file']['tmp_name'];
//
//echo 'public/image/'.$old_file_name;

$newName = md5($old_file_name.time());

move_uploaded_file($tempPath,'public/image/'.$newName.'.img');

echo '上传成功';
